<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Os1: /home/alejandro/Desarrollo eclipse/os1/Thirdparty/DBoW2/DBoW2/ScoringObject.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Os1
   &#160;<span id="projectnumber">1</span>
   </div>
   <div id="projectbrief">OrbSlam2 documentado y modificado</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,'Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_scoring_object_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">ScoringObject.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_scoring_object_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#ifndef __D_T_SCORING_OBJECT__</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#define __D_T_SCORING_OBJECT__</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_bow_vector_8h.html">BowVector.h</a>&quot;</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespace_d_bo_w2.html">DBoW2</a> {</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="class_d_bo_w2_1_1_general_scoring.html">   18</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_d_bo_w2_1_1_general_scoring.html">GeneralScoring</a></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;{</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="class_d_bo_w2_1_1_general_scoring.html#a43b3f5fedb19e6a19e17b9813efd17e8">score</a>(<span class="keyword">const</span> <a class="code" href="class_d_bo_w2_1_1_bow_vector.html">BowVector</a> &amp;v, <span class="keyword">const</span> <a class="code" href="class_d_bo_w2_1_1_bow_vector.html">BowVector</a> &amp;w) <span class="keyword">const</span> = 0;</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="class_d_bo_w2_1_1_general_scoring.html#ab0cadafd50b0f2f559f6325a6944f72f">mustNormalize</a>(<a class="code" href="namespace_d_bo_w2.html#a53e9e0bcfc25c861815e413a7cf3fa51">LNorm</a> &amp;norm) <span class="keyword">const</span> = 0;</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;</div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="class_d_bo_w2_1_1_general_scoring.html#af470bccf750689525622f216f07d6f3c">   39</a></span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">double</span> <a class="code" href="class_d_bo_w2_1_1_general_scoring.html#af470bccf750689525622f216f07d6f3c">LOG_EPS</a>; </div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;  <span class="comment">// If you change the type of WordValue, make sure you change also the</span></div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    <span class="comment">// epsilon value (this is needed by the KL method)</span></div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;</div><div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="class_d_bo_w2_1_1_general_scoring.html#a1796812280a5188e06d8137baa977776">   43</a></span>&#160;  <span class="keyword">virtual</span> <a class="code" href="class_d_bo_w2_1_1_general_scoring.html#a1796812280a5188e06d8137baa977776">~GeneralScoring</a>() {} </div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    </div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;};</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;</div><div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="_scoring_object_8h.html#a3922c232b91184a032cb6ff76d4ebac4">   53</a></span>&#160;<span class="preprocessor">#define __SCORING_CLASS(NAME, MUSTNORMALIZE, NORM) \</span></div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;<span class="preprocessor">  NAME: public GeneralScoring \</span></div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;<span class="preprocessor">  { public: \</span></div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="preprocessor"> \</span></div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;<span class="preprocessor">    virtual double score(const BowVector &amp;v, const BowVector &amp;w) const; \</span></div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;<span class="preprocessor">    \</span></div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;<span class="preprocessor"> \</span></div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;<span class="preprocessor">    virtual inline bool mustNormalize(LNorm &amp;norm) const  \</span></div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;<span class="preprocessor">      { norm = NORM; return MUSTNORMALIZE; } \</span></div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;<span class="preprocessor">  }</span></div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;  </div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;<span class="keyword">class </span><a class="code" href="namespace_d_bo_w2.html#a75539718457109a0efbd4778f7fa7369">__SCORING_CLASS</a>(L1Scoring, true, <a class="code" href="namespace_d_bo_w2.html#a53e9e0bcfc25c861815e413a7cf3fa51a94f5879ff083c0a8364805ae4f9c2d5c">L1</a>);</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;<span class="keyword">class </span><a class="code" href="namespace_d_bo_w2.html#a75539718457109a0efbd4778f7fa7369">__SCORING_CLASS</a>(L2Scoring, true, <a class="code" href="namespace_d_bo_w2.html#a53e9e0bcfc25c861815e413a7cf3fa51aff96c9503798aa8504a954d3832e5eaa">L2</a>);</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;<span class="keyword">class </span><a class="code" href="namespace_d_bo_w2.html#a75539718457109a0efbd4778f7fa7369">__SCORING_CLASS</a>(ChiSquareScoring, true, <a class="code" href="namespace_d_bo_w2.html#a53e9e0bcfc25c861815e413a7cf3fa51a94f5879ff083c0a8364805ae4f9c2d5c">L1</a>);</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;<span class="keyword">class </span><a class="code" href="namespace_d_bo_w2.html#a75539718457109a0efbd4778f7fa7369">__SCORING_CLASS</a>(KLScoring, true, <a class="code" href="namespace_d_bo_w2.html#a53e9e0bcfc25c861815e413a7cf3fa51a94f5879ff083c0a8364805ae4f9c2d5c">L1</a>);</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;<span class="keyword">class </span><a class="code" href="namespace_d_bo_w2.html#a75539718457109a0efbd4778f7fa7369">__SCORING_CLASS</a>(BhattacharyyaScoring, true, <a class="code" href="namespace_d_bo_w2.html#a53e9e0bcfc25c861815e413a7cf3fa51a94f5879ff083c0a8364805ae4f9c2d5c">L1</a>);</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;<span class="keyword">class </span><a class="code" href="namespace_d_bo_w2.html#a75539718457109a0efbd4778f7fa7369">__SCORING_CLASS</a>(DotProductScoring, false, <a class="code" href="namespace_d_bo_w2.html#a53e9e0bcfc25c861815e413a7cf3fa51a94f5879ff083c0a8364805ae4f9c2d5c">L1</a>);</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;<span class="preprocessor">#undef __SCORING_CLASS</span></div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;  </div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;} <span class="comment">// namespace DBoW2</span></div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;</div><div class="ttc" id="_bow_vector_8h_html"><div class="ttname"><a href="_bow_vector_8h.html">BowVector.h</a></div></div>
<div class="ttc" id="class_d_bo_w2_1_1_bow_vector_html"><div class="ttname"><a href="class_d_bo_w2_1_1_bow_vector.html">DBoW2::BowVector</a></div><div class="ttdoc">Vector of words to represent images. </div><div class="ttdef"><b>Definition:</b> BowVector.h:56</div></div>
<div class="ttc" id="class_d_bo_w2_1_1_general_scoring_html_a43b3f5fedb19e6a19e17b9813efd17e8"><div class="ttname"><a href="class_d_bo_w2_1_1_general_scoring.html#a43b3f5fedb19e6a19e17b9813efd17e8">DBoW2::GeneralScoring::score</a></div><div class="ttdeci">virtual double score(const BowVector &amp;v, const BowVector &amp;w) const =0</div><div class="ttdoc">Computes the score between two vectors. </div></div>
<div class="ttc" id="namespace_d_bo_w2_html_a53e9e0bcfc25c861815e413a7cf3fa51"><div class="ttname"><a href="namespace_d_bo_w2.html#a53e9e0bcfc25c861815e413a7cf3fa51">DBoW2::LNorm</a></div><div class="ttdeci">LNorm</div><div class="ttdoc">L-norms for normalization. </div><div class="ttdef"><b>Definition:</b> BowVector.h:29</div></div>
<div class="ttc" id="class_d_bo_w2_1_1_general_scoring_html_af470bccf750689525622f216f07d6f3c"><div class="ttname"><a href="class_d_bo_w2_1_1_general_scoring.html#af470bccf750689525622f216f07d6f3c">DBoW2::GeneralScoring::LOG_EPS</a></div><div class="ttdeci">static const double LOG_EPS</div><div class="ttdoc">Log of epsilon. </div><div class="ttdef"><b>Definition:</b> ScoringObject.h:39</div></div>
<div class="ttc" id="namespace_d_bo_w2_html_a75539718457109a0efbd4778f7fa7369"><div class="ttname"><a href="namespace_d_bo_w2.html#a75539718457109a0efbd4778f7fa7369">DBoW2::__SCORING_CLASS</a></div><div class="ttdeci">class __SCORING_CLASS(L1Scoring, true, L1)</div><div class="ttdoc">L1 Scoring object. </div></div>
<div class="ttc" id="class_d_bo_w2_1_1_general_scoring_html"><div class="ttname"><a href="class_d_bo_w2_1_1_general_scoring.html">DBoW2::GeneralScoring</a></div><div class="ttdoc">Base class of scoring functions. </div><div class="ttdef"><b>Definition:</b> ScoringObject.h:18</div></div>
<div class="ttc" id="class_d_bo_w2_1_1_general_scoring_html_ab0cadafd50b0f2f559f6325a6944f72f"><div class="ttname"><a href="class_d_bo_w2_1_1_general_scoring.html#ab0cadafd50b0f2f559f6325a6944f72f">DBoW2::GeneralScoring::mustNormalize</a></div><div class="ttdeci">virtual bool mustNormalize(LNorm &amp;norm) const =0</div><div class="ttdoc">Returns whether a vector must be normalized before scoring according to the scoring scheme...</div></div>
<div class="ttc" id="class_d_bo_w2_1_1_general_scoring_html_a1796812280a5188e06d8137baa977776"><div class="ttname"><a href="class_d_bo_w2_1_1_general_scoring.html#a1796812280a5188e06d8137baa977776">DBoW2::GeneralScoring::~GeneralScoring</a></div><div class="ttdeci">virtual ~GeneralScoring()</div><div class="ttdoc">Required for virtual base classes. </div><div class="ttdef"><b>Definition:</b> ScoringObject.h:43</div></div>
<div class="ttc" id="namespace_d_bo_w2_html_a53e9e0bcfc25c861815e413a7cf3fa51a94f5879ff083c0a8364805ae4f9c2d5c"><div class="ttname"><a href="namespace_d_bo_w2.html#a53e9e0bcfc25c861815e413a7cf3fa51a94f5879ff083c0a8364805ae4f9c2d5c">DBoW2::L1</a></div><div class="ttdef"><b>Definition:</b> BowVector.h:31</div></div>
<div class="ttc" id="namespace_d_bo_w2_html_a53e9e0bcfc25c861815e413a7cf3fa51aff96c9503798aa8504a954d3832e5eaa"><div class="ttname"><a href="namespace_d_bo_w2.html#a53e9e0bcfc25c861815e413a7cf3fa51aff96c9503798aa8504a954d3832e5eaa">DBoW2::L2</a></div><div class="ttdef"><b>Definition:</b> BowVector.h:32</div></div>
<div class="ttc" id="namespace_d_bo_w2_html"><div class="ttname"><a href="namespace_d_bo_w2.html">DBoW2</a></div><div class="ttdoc">File: BowVector.cpp Date: March 2011 Author: Dorian Galvez-Lopez Description: bag of words vector Lic...</div><div class="ttdef"><b>Definition:</b> BowVector.cpp:18</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_08235c883c2d11e586a63e6645937db5.html">Thirdparty</a></li><li class="navelem"><a class="el" href="dir_d1a1b6b9a428c17d660585cf3877a970.html">DBoW2</a></li><li class="navelem"><a class="el" href="dir_004f071c35dfaac2458bd63a15bbc95f.html">DBoW2</a></li><li class="navelem"><a class="el" href="_scoring_object_8h.html">ScoringObject.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.12 </li>
  </ul>
</div>
</body>
</html>
